<script>
import APPUpdate from "@/plugins/APPUpdate"

export default {
  globalData: {
    appSystemInfo: null,

    versionUpdate: false,
    versionProgress: 0,
    downloadTask: null,
    thatView: null,

    local_token: null,
    _cityList: []
  },
  onLaunch: async function () {
    // let self = this
    // self.getNotificationAuthority()
    // await this.getCityList()
    // let local_token = uni.getStorageSync("localToken")
    // if (local_token) {
    //   self.$api.loginPersistence({
    //     localToken: local_token
    //   }).then(res => {
    //     self.changeTab(res)
    //     self.$isResolve()
    //     self.afterLogin(res, res.type !== 'machinery')
    //   }).catch(e => {
    //     uni.removeStorageSync("token")
    //     uni.removeStorageSync("localToken")
    //     uni.navigateTo({
    //       url: "/pages/loginPage/telLogin",
    //       animationType: 'pop-in',
    //       animationDuration: 200
    //     });
    //   })
    // }
    // uni.onTabBarMidButtonTap(function (e) {
    //   let userInfo = uni.getStorageSync("userInfo") ? JSON.parse(uni.getStorageSync("userInfo")) : null
    //   if (userInfo) {
    //     if (userInfo.type === 'supply') {
    //       uni.navigateTo({
    //         url: "/pages/release/releaseEdit",
    //         animationType: 'pop-in',
    //         animationDuration: 200
    //       });
    //     } else if (userInfo.type === 'consume') {
    //       uni.navigateTo({
    //         url: "/pages/demand/demandEdit",
    //         animationType: 'pop-in',
    //         animationDuration: 200
    //       });
    //     }
    //   }
    // })
    // APPUpdate()
  },
  onHide: function () {
  }
}
</script>

<style lang="scss">
@import './static/font/iconfont.css';
/*每个页面公共css */
page {
  background-color: $bg-page;
}

.uni-body {
  position: relative;
}
</style>
